package Luogu;

import java.util.Scanner;

public class test3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int i = sc.nextInt();
        int result = 0;
        while (i != 0) {
            int t = i % 10;
            result = result * 10 + t;
            i/=10;

        }
        System.out.println(result);
    }
}
